<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>${constants.getSystemName()}</title>
    <link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}"/>
    <link rel="stylesheet" href="${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}"
          media="all"/>

    <style>
        /** 卡片轮播图样式 */
        .admin-carousel .layui-carousel-ind {
            position: absolute;
            top: -41px;
            text-align: right;
        }

        .admin-carousel .layui-carousel-ind ul {
            background: 0 0;
        }

        .admin-carousel .layui-carousel-ind li {
            background-color: #e2e2e2;
        }

        .admin-carousel .layui-carousel-ind li .layui-this {
            background-color: #999;
        }

        /** 自定义样式*/

        .layui-color-skyblue-lwh-delete {
            margin-top: 5px;
            /*background-color: #87CEEB !important*/
            color: #87CEEB !important
        }

        .layui-bg-lwh-schedule {
            background-color: #E0EEEE !important
        }

        .layui-height-lwh {
            height: 154px;
        }

        .layui-height-lwh-header {
            height: 30%;
        }

        .layui-height-lwh-body {
            height: 70%;
        }

    </style>

</head>

<body>
    <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
    <!-- 正文开始 -->
    <div class="layui-fluid layui-form">
        <div class="layui-row layui-col-space15">
            <!--我的日程-->
            <div class="layui-row layui-col-space15 layui-bg-lwh-schedule">
                <!-- 自定义css layui-bg-lwh-schedule  -->
                <div class="layui-col-md3">
                    <p class="lay-big-font">我的日程</p>
                </div>
                <div class=" layui-col-md3">
                    <input type="text" name="my_schedule_select_input" required lay-verify="required"
                           placeholder="请输入搜索内容"
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-col-md6">
                    <button name="my_schedule_select_button" type="button"
                            class="layui-btn layui-btn-normal layui-btn-radius">确定
                    </button>
                </div>
            </div>
            <!--我的日程编辑-->
            <div class="layui-row layui-col-space15">
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
                    <div class="layui-card layui-height-lwh">
                        <div class="layui-card-header layui-height-lwh-header" id="deleteSchedule1">
                            <label>创建时间</label>
                            <button data-method="offset" data-id="deleteSchedule1" data-type="auto"
                                    name="my_schedule_delete_1" type="button"
                                    class="layui-btn layui-btn-sm layui-btn-primary pull-right layui-color-skyblue-lwh-delete">
                                <i class="layui-icon">&#xe640;</i>
                            </button>
                        </div>
                        <div class="layui-card-body layui-height-lwh-body">
                            <p class="lay-big-font">我的日程表1</p>
                            <p>&nbsp;<span class="pull-right">
											<input type="checkbox" name="my_schedule_open_1" lay-skin="switch"
                                                   lay-text="公开|私有">
										</span></p>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md3">
                    <div class="layui-card layui-height-lwh">
                        <div class="layui-card-header layui-height-lwh-header" id="deleteSchedule2">
                            <label>创建时间</label>
                            <button data-method="offset" id="deleteSchedule3" data-id="deleteSchedule2" data-type="auto"
                                    type="button"
                                    class="layui-btn layui-btn-sm layui-btn-primary pull-right layui-color-skyblue-lwh-delete">
                                <i class="layui-icon">&#xe640;</i>
                            </button>
                        </div>
                        <div class="layui-card-body layui-height-lwh-body">
                            <p class="lay-big-font">我的日程表2</p>
                            <p>&nbsp;<span class="pull-right"><input type="checkbox" name="my_schedule_open_2"
                                                                     lay-skin="switch" lay-text="公开|私有"></span></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
<!-- js部分 -->
@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "${ctxPath}",
        version: '${constants.getReleaseVersion()}'
    };

</script>

<script type="text/javascript"
        src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>

<script>
    layui.use(['layer', 'carousel', 'form'], function() {
        var $ = layui.jquery;
        var layer = layui.layer;
        var carousel = layui.carousel;
        var device = layui.device;
        var form = layui.form;
        var buttomId = "全局变量";
        // 渲染轮播
        carousel.render({
            elem: '.layui-carousel',
            width: '100%',
            height: '60px',
            arrow: 'none',
            autoplay: true,
            trigger: device.ios || device.android ? 'click' : 'hover',
            anim: 'fade'
        });

        $(function() {
            $("#schedule_frame_create").click(function() {
                window.location.href = "/myScheduleFrame/addSframe";
            });
        });

        //触发事件
        var active = {

            offset: function(othis) {
                var type = othis.data('type'),
                    bId = othis.data('id'),
                    text = "不删除可以吗?";
                buttomId=bId;
                layer.open({
                    type: 1,
                    title: "您将删除日程表",
                    offset: type //具体配置参考：http://www.layui.com/doc/modules/layer.html#offset
                    ,id: bId + type //防止重复弹出
                    ,content: '<div style="padding: 20px 100px;">' + text + '</div>',
                    btn: ['不可以', '不删除'],
                    btnAlign: 'c' //按钮居中
                    ,shade: 0 //不显示遮罩
                    ,yes: function() {
                        layer.closeAll();
                        layer.msg("抱歉，您已删除成功。", {
                            time: 2000,
                            icon: 5
                        });
                    },
                    btn2: function() {
                        layer.closeAll();
                        layer.msg("恭喜您，您删除失败了。", {
                            time: 2000,
                            icon: 6
                        });
                    }
                });
            },
        };

        $('#deleteSchedule1 .layui-btn').on('click', function() {
            var othis = $(this),
                method = othis.data('method');
            active[method] ? active[method].call(this, othis) : '';
        });

        $('#deleteSchedule2 .layui-btn').on('click', function() {
            var othis = $(this),
                method = othis.data('method');
            active[method] ? active[method].call(this, othis) : '';
        });


    });

</script>

</body>

</html>
